{extend name="layout/layout" /}

{block name="pagecss"}
<link href="__STATIC__/plugins/bootstrap-switch/css/bootstrap-switch.min.css" rel="stylesheet" type="text/css" />
<link href="__STATIC__/admin/pages/css/printer.css" rel="stylesheet" type="text/css" />
{/block}

{block name="content"}
<div class="row js-check-wrap">
    <div class="col-lg-12">
        <div class="box box-success">
            <div class="box-header with-border" style="line-height: 40px">
                <div class="row">
                    <div class="col-md-9">
                        <div class="caption">
                            <i class="icon-settings font-dark"></i><span class="caption-subject bold uppercase">小票机设置</span>
                            <i class="fa fa-question-circle" aria-hidden="true"></i>
                        </div>
                    </div>
                </div>
                <div class="box-tools pull-right">
                    <button class="btn btn-primary" id="add_printer"><span class="glyphicon glyphicon-plus-sign"></span> 添加小票机
                    </button>
                </div>
            </div>
            <div class="box-body ">
                <form class="js-ajax-form" method="post">
                    <div id="table">
                        <table class="table table-striped table-bordered table-hover table-checkable order-column" id="table_role">
                            <thead>
                            <tr>
                                <th>小票机名称</th>
                                <th>小票机编码（SN）</th>
                                <th>小票机密钥（key）</th>
                                <th>适用门店</th>
                                <th>状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            </tbody>
                        </table>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<input type="hidden" class="datalist_url" value="{:url('admin/member/getMemberList')}">
<input type="hidden" class="view_url" value="{:url('admin/member/view')}">
{/block}

{block name="pagescript"}
<script>
    var index_url = "{:url('admin/printer/index')}";   //获取列表
    var list_url = "{:url('admin/printer/indexApi')}";   //获取小票机列表
    var edit_url = "{:url('admin/printer/edit')}";  //添加
    var del_url = "{:url('admin/printer/DelPrinter')}"
</script>
<script src="__STATIC__/admin/js/include.js" type="text/javascript"></script>
<script src="__STATIC__/plugins/bootstrap-switch/js/bootstrap-switch.min.js" type="text/javascript"></script>
<script src="__STATIC__/admin/pages/js/printer.js?v={:time()}" type="text/javascript"></script>
{/block}